﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace Simple.Repository.Models.Attendance
{
    [Index(nameof(UserNumber), IsUnique = false)]
    [Index(nameof(AttendanceTime), IsUnique = false)]
    public class AttendanceRecordNew : EntityBase<Guid>
    {

        /// <summary>
        /// 用户Id
        /// </summary>
        public Guid? UserId { get; set; }

        /// <summary>
        /// 打卡时间
        /// </summary>
        public DateTime AttendanceTime { get; set; }

        /// <summary>
        /// 考勤类型
        /// 1.员工考勤
        /// 2.幼儿考勤
        /// </summary>
        public int? AttendanceType { get; set; }

        /// <summary>
        /// 考勤组
        /// </summary>
        public Guid? AttendanceGroup { get; set; }

        /// <summary>
        /// 工号
        /// </summary>
        [MaxLength(100)]
        public string? UserNumber { get; set; }

        /// <summary>
        /// 创建时间
        /// </summary>
        public DateTime CreateTime { get; set; }

        /// <summary>
        /// 设备编号
        /// </summary>
        public string? DeviceCode { get; set; }

        /// <summary>
        /// 开门方式 1：刷脸 2：刷卡
        /// </summary>
        public int? OpenDoorType { get; set; }

        /// <summary>
        /// 进门方式：1入校，2出校
        /// </summary>
        public int? EntranceType { get; set; }
    }
}
